<?php

header("Content-type: text/xml");

if (JAdmin_core::check_login()) {

	$userInfo['state'] = 200;
	
	$userInfo['nickname'] = $USER['username'];
	
	$userInfo['screen'] = $USER['webos_screen'];
	
	$userInfo['headImg'] = "bbs/uc_server/avatar.php?uid=$USER[uid]&amp;size=small";
	
	$userInfo['themeUrl'] = common::replaceUrl($USER['webos_theme']);
	
	$userInfo['themeWidth'] = $USER['webos_themewidth'];
	
	$userInfo['themeHeight'] = $USER['webos_themeheight'];
	
	$userInfo['search'] = common::replaceUrl($USER['webos_search']);
	
	$userInfo['inputMethod'] = common::replaceUrl($USER['webos_inputmethod']);
	
	$userInfo['bgSound'] = common::replaceUrl($USER['webos_userBgSound']);

} else {

	$userInfo['state'] = 403;
	
	$userInfo['nickname'] = $language['webos']['userinfo-out-nick'];
	
	$userInfo['screen'] = $WEBOSDATA['defaultScreen'];
	
	$userInfo['headImg'] = "bbs/uc_server/avatar.php?size=small";
	
	$userInfo['themeUrl'] = common::replaceUrl($WEBOSDATA['defaultTheme']);
	
	$userInfo['themeWidth'] = $WEBOSDATA['defaultThemeWidth'];
	
	$userInfo['themeHeight'] = $WEBOSDATA['defaultThemeHeight'];
	
	$userInfo['search'] = common::replaceUrl($WEBOSDATA['defaultSearch']);
	
	$userInfo['inputMethod'] = common::replaceUrl($WEBOSDATA['defaultInputMethod']);
	
	$userInfo['bgSound'] = common::replaceUrl($WEBOSDATA['defaultBgSound']);
	
}

?>
<UserInfo>

	<add key="state" value="<?php echo $userInfo['state'];?>"></add>

	<add key="nickname" value="<?php echo $userInfo['nickname'];?>"></add>

	<add key="defaultScreen" value="<?php echo $userInfo['screen'];?>"></add>

	<add key="headImage" value="<?php echo $userInfo['headImg'];?>"></add>

	<add key="theme" width="<?php echo $userInfo['themeWidth'];?>" height="<?php echo $userInfo['themeHeight'];?>" href="<?php echo $userInfo['themeUrl'];?>"></add>

	<add key="search" value="<?php echo $userInfo['search'];?>"></add>

	<add key="inputMethod" value="<?php echo $userInfo['inputMethod'];?>"></add>
	
	<add key="bgSound" value="<?php echo $userInfo['bgSound'];?>"></add>
	
	<add key="userInfo" value="bbs/home.php?mod=spacecp"></add>

	<add key="applicationList" value="control/interface.php?action=webos&amp;mod=get-userapp"></add>

</UserInfo>